package a.i;

import java.beans.IntrospectionException;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyDescriptor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

public class e
  implements hb
{
  private Class a;
  private Map b = new HashMap();
  private Map d = new HashMap();
  private static final Object[] e = new Object[0];
  public static boolean f;
  
  public e(Class paramClass)
  {
    this.a = paramClass;
  }
  
  public void a(String paramString1, String paramString2)
    throws IntrospectionException
  {
    PropertyDescriptor localPropertyDescriptor = new PropertyDescriptor(paramString1, this.a);
    this.b.put(paramString2, localPropertyDescriptor);
  }
  
  private void a()
    throws IntrospectionException
  {
    boolean bool = p.a;
    this.b.clear();
    Iterator localIterator = this.d.entrySet().iterator();
    do
    {
      if (!localIterator.hasNext()) {
        break;
      }
      Map.Entry localEntry = (Map.Entry)localIterator.next();
      a((String)localEntry.getKey(), (String)localEntry.getValue());
    } while (!bool);
  }
  
  public void a(Object paramObject, Map paramMap, jb paramjb)
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    Iterator localIterator = this.b.entrySet().iterator();
    do
    {
      do
      {
        for (;;)
        {
          if (!localIterator.hasNext()) {
            return;
          }
          Map.Entry localEntry = (Map.Entry)localIterator.next();
          PropertyDescriptor localPropertyDescriptor = (PropertyDescriptor)localEntry.getValue();
          String str1 = (String)localEntry.getKey();
          try
          {
            Method localMethod = localPropertyDescriptor.getReadMethod();
            Object localObject = localMethod.invoke(paramObject, e);
            String str2 = paramjb.a(localObject, localPropertyDescriptor.getPropertyType());
            paramMap.put(str1, str2);
          }
          catch (InvocationTargetException localInvocationTargetException)
          {
            n.a(localInvocationTargetException);
          }
          catch (IllegalAccessException localIllegalAccessException)
          {
            n.a(localIllegalAccessException);
          }
          catch (IllegalArgumentException localIllegalArgumentException)
          {
            n.a(localIllegalArgumentException);
          }
        }
      } while (bool2);
    } while (!bool1);
  }
  
  public void b(Object paramObject, Map paramMap, jb paramjb)
  {
    boolean bool2 = p.b;
    boolean bool1 = p.a;
    Iterator localIterator = this.b.entrySet().iterator();
    do
    {
      do
      {
        for (;;)
        {
          if (!localIterator.hasNext()) {
            return;
          }
          Map.Entry localEntry = (Map.Entry)localIterator.next();
          PropertyDescriptor localPropertyDescriptor = (PropertyDescriptor)localEntry.getValue();
          String str = (String)localEntry.getKey();
          Object localObject = paramjb.a((String)paramMap.get(str), localPropertyDescriptor.getPropertyType());
          if (localObject != null) {
            try
            {
              Method localMethod = localPropertyDescriptor.getWriteMethod();
              localMethod.invoke(paramObject, new Object[] { localObject });
            }
            catch (InvocationTargetException localInvocationTargetException)
            {
              n.a(localInvocationTargetException);
            }
            catch (IllegalAccessException localIllegalAccessException)
            {
              n.a(localIllegalAccessException);
            }
            catch (IllegalArgumentException localIllegalArgumentException)
            {
              n.a(localIllegalArgumentException);
            }
          }
        }
      } while (bool2);
    } while (!bool1);
  }
  
  public PropertyChangeListener c(Object paramObject, Map paramMap, jb paramjb)
  {
    return new a_(paramObject, paramMap, paramjb);
  }
  
  private final class a_
    implements PropertyChangeListener
  {
    private Object a;
    private Map b;
    private jb d;
    
    a_(Object paramObject, Map paramMap, jb paramjb)
    {
      this.a = paramObject;
      this.d = paramjb;
    }
    
    public void propertyChange(PropertyChangeEvent paramPropertyChangeEvent)
    {
      boolean bool = p.b;
      String str = paramPropertyChangeEvent.getPropertyName();
      PropertyDescriptor localPropertyDescriptor = (PropertyDescriptor)e.this.b.get(str);
      if ((bool) || (localPropertyDescriptor != null))
      {
        Object localObject1 = paramPropertyChangeEvent.getNewValue();
        Method localMethod = localPropertyDescriptor.getWriteMethod();
        Object localObject2 = this.d.a((String)localObject1, localMethod.getParameterTypes()[0]);
        try
        {
          if (!bool)
          {
            if (localObject2 == null) {}
          }
          else {
            localMethod.invoke(this.a, new Object[] { localObject2 });
          }
        }
        catch (InvocationTargetException localInvocationTargetException)
        {
          n.a(localInvocationTargetException);
        }
        catch (IllegalAccessException localIllegalAccessException)
        {
          n.a(localIllegalAccessException);
        }
        catch (IllegalArgumentException localIllegalArgumentException)
        {
          n.a(localIllegalArgumentException);
        }
      }
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.i.e

 * JD-Core Version:    0.7.0.1

 */